<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>LoginByPhone</title>
    <link rel="StyleSheet" href="../css/login.css" type="text/css" media="screen" />
    <link rel="StyleSheet" href="../css/common.css" type="text/css" media="screen" />
    <script src="https://kit.fontawesome.com/58cb2985af.js" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<div th:replace="common/top"></div>

<div id="w">
    <div class="content" id="popLayer" style="text-align: center;background-color: #ffffff;">
        <span class="cartMsg">提示:</span>
    </div>
    <div class="loginContent">
        <div class="loginTitle">
            <a class="btn" href="/user/loginByNameForm" role="button">Account Login</a>
            <a id="btn2" class="btn" href="/user/loginByPhoneForm" role="button">SMS Login</a>
        </div>

        <form action="/user/loginByPhone" class="loginForm" method="post">
            <div th:if="${errorMsg} != null" class="errorContent">
                <p th:text="${errorMsg}" id="error" name="error">error</p>
            </div>
            <div class="loginFormItem">
                <label for="phoneNumber" class="loginFormLabel">
                    <i class="fa-solid fa-user"></i>
                </label>
                <input type="text" class="loginFormInput" name="phoneNumber" id="phoneNumber" placeholder="请输入手机号">
            </div>

            <div class="loginFormItem">
                <label for="phoneCode" class="loginFormLabel">
                    <i class="fa-solid fa-lock"></i>
                </label>
                <input type="text" class="loginFormInputCode" name="phoneCode" id="phoneCode" placeholder="请输入短信验证码">
                <button type="submit" class="obtain" >Obtain</button>
            </div>

            <div class="loginFormLink">
                <a href="/user/resetPasswordForm" class="link">忘记密码?</a>
            </div>

            <div class="loginFormItemSubmit">
                <input type="submit" class="loginFormSubmit" value="Login">
            </div>

            <div class="loginFormLink">
                <a href="/user/loginByGitee" class="link1">第三方登录</a>
                <a href="/register" class="link2">没有账号? 去注册</a>
            </div>
        </form>
    </div>
</div>

<div th:replace="common/bottom">

</div>
<script src="../js/sendPhoneCodeForLogin.js"></script>
</body>
</html>